package org.common.utils;

import lombok.Setter;
import lombok.Getter;

@Setter
@Getter
public class ApiResponse {
    private int code;

    private String message;

    private Object data;


    public ApiResponse(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static ApiResponse success(Object data) {
        return new ApiResponse(200, "success", data);
    }

    public static ApiResponse fail(Object data) {
        return new ApiResponse(200, "fail", data);
    }

}